<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet  [
	<!ENTITY nbsp   "&#160;">
	<!ENTITY copy   "&#169;">
	<!ENTITY reg    "&#174;">
	<!ENTITY trade  "&#8482;">
	<!ENTITY mdash  "&#8212;">
	<!ENTITY ldquo  "&#8220;">
	<!ENTITY rdquo  "&#8221;"> 
	<!ENTITY pound  "&#163;">
	<!ENTITY yen    "&#165;">
	<!ENTITY euro   "&#8364;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:page="urn:page">
  <xsl:output method="html" encoding="utf-8"/>
  <xsl:param name="param"/>					<!--引入 param 参数-->
  <xsl:template name="main"  match="/">
    <xsl:param name="pid"/>
    <xsl:variable name="topid">
    <xsl:choose>
    <xsl:when test="$pid=''">0</xsl:when>
    <xsl:otherwise><xsl:value-of select="$pid"/></xsl:otherwise>
    </xsl:choose>
    </xsl:variable>
    <ul class="MenuSelect">
    <xsl:for-each select="//rows/row[F_PID=$topid]">
      <xsl:variable name="id" select="ID"/>
      <li><label style="font-size:12px;white-space:nowrap;overflow:hidden" title="{F_Name}"><input name="F_Catalog_ID" type="checkbox" value="{ID}" title="{F_Name}" id="F_Catalog_ID" onclick="return TM.doSelect(this.checked,'{F_Name}','{ID}')">
      <xsl:if test="contains(concat(',',page:xRequest('values')),concat(',',string(ID))) or contains(concat(',',$param),concat(',',string(ID)))">
        <xsl:attribute name="checked">true</xsl:attribute>
      </xsl:if>
      </input><xsl:value-of select="F_Name"/></label></li>
        <xsl:if test="count(//rows/row[F_PID=$id])&gt;0">
          <xsl:call-template name="main">
          <xsl:with-param name="pid" select="ID"/>
          </xsl:call-template>
        </xsl:if>
    </xsl:for-each>
    </ul>

  </xsl:template>
</xsl:stylesheet>
